// 导入
import request from "@/utils/request";
import qs from "qs";

// 导出
export const getUserHistoryApi = (params) => {
  return request({
    url: "/users/history.jsp",
    method: "get",
    params,
  });
};

export const getUserApi = (params) => {
  return request({
    url: "/users/index.jsp",
    method: "get",
    params,
  });
};

export const postUserApi = (params) => {
  return request({
    url: "/users/create.jsp",
    method: "post",
    data: qs.stringify(params),
  });
};

export const deleteUserApi = (params) => {
  return request({
    url: "/users/delete.jsp",
    method: "delete",
    params,
  });
};

export const putUserStateApi = (params) => {
  return request({
    url: "/users/state.jsp",
    method: "put",
    data: qs.stringify(params),
  });
};

export const putUserApi = (params) => {
  return request({
    url: "/users/update.jsp",
    method: "put",
    data: qs.stringify(params),
  });
};

export const putUserAssignApi = (params) => {
  return request({
    url: "/users/assign.jsp",
    method: "put",
    data: qs.stringify(params),
  });
};
